home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v9n03.arc / SCANDIR.BAT < prev    next >
DOS Batch File  |  1990-01-12  |  4KB  |  75 lines

  1. ECHO OFF
  2. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  3. ECHO ║ SCANdir will check the files in the current directory, comparing the    ║
  4. ECHO ║ resultant check data with that recorded on the CHECK diskette.          ║
  5. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  6. ECHO ║ If FASTrun was executed first, directory ))PCITK.TMP will be used to    ║
  7. ECHO ║ load all programs and batch files, otherwise they will be loaded from   ║
  8. ECHO ║ the CHECK diskette.                                                     ║
  9. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  10. ECHO ║    PCDATA TOOLKIT 1.0 Copyright (C) 1990 Ziff Communications Co.        ║
  11. ECHO ║                    PC Magazine ■ Wolfgang Stiller                       ║
  12. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  13. IF "%1"=="" goto Help
  14. IF %1==? goto Help
  15. CD %1\
  16. IF NOT EXIST %1DELFILES.BAT GOTO  MissingMT
  17. IF "%PATH%"=="\))PCITK.TMP" GOTO Start
  18. IF NOT EXIST %1SCANRFDR.BAT GOTO  MissingADS
  19. IF NOT EXIST %1CHKFILEC.COM GOTO  MissingADS
  20. IF NOT EXIST %1CFCOMPC.COM GOTO  MissingADS
  21. GOTO Start0
  22. :Help
  23. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  24. ECHO ║ Syntax is   SCANDIR  a:                                                 ║
  25. ECHO ║     where "a:" is the drive containing a CHECK or CHECK-MT diskette.    ║
  26. ECHO ║     The current disk must be the one which is to be checked.            ║
  27. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  28. ECHO ║ SCANdir will check all files in the current directory and compare the   ║
  29. ECHO ║ results with that recorded on the CHECK diskette.  SCANdir will         ║
  30. ECHO ║ report any file which has been changed, added or deleted.  This report  ║
  31. ECHO ║ will be displayed upon the screen.                                      ║
  32. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  33. GOTO End
  34. :MissingMT
  35. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  36. ECHO ║ You MUST have a valid CHECK or CHECK-MT diskette in the drive which     ║
  37. ECHO ║ you specified with the %1 parameter. You are missing DELFILES.BAT.      ║
  38. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  39. GOTO End
  40. :MissingADS
  41. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  42. ECHO ║ You MUST have a valid CHECK or CHECK-MT diskette in the drive which     ║
  43. ECHO ║ you specified with the %1 parameter.                                    ║
  44. ECHO ╟─────────────────────────────────────────────────────────────────────────╢
  45. ECHO ║ You are missing CHKFILEC.COM, CFCOMPC.COM or SCANRFDR.BAT.              ║
  46. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  47. GOTO End
  48. :   Enter here if we are NOT executing on a "FASTrun" system
  49. :Start0
  50. PATH=%1\
  51. :
  52. :   Enter here if "FASTrun" has set PATH and COMSPEC
  53. :Start
  54. CHKFILEC *.* ))B.LOG /D/I:))
  55. ECHO  **** Checking is complete. *****
  56. MIRdir %1
  57. IF ERRORLEVEL 32 GOTO BadCHK
  58. :  To also see addtions and deletions of files, remove the /C parameter.
  59. CFCOMPC %1))A.LOG ))B.LOG/P
  60. IF ERRORLEVEL 4 GOTO CHANGES
  61. DEL ))B.LOG
  62. GOTO End
  63. :Changes
  64. COPY ))B.LOG %1))A.LOG
  65. DEL ))B.LOG
  66. CD %1\
  67. GOTO End
  68. :BadCHK
  69. ECHO ╔═════════════════════════════════════════════════════════════════════════╗
  70. ECHO ║ The corresponding directory was not found on the disk in drive %1.      ║
  71. ECHO ║ This usually means that the correct CHECK diskette is not in %1 or      ║
  72. ECHO ║ you have added directories since you last ran SCANmax or SCANsys.       ║
  73. ECHO ╚═════════════════════════════════════════════════════════════════════════╝
  74. :End
  75.